$(function(){
        $('[name=stu_name]').focus();
        $('#save').click(function(){
            if(check()){
                $("form:first").submit();
            }
        });

        function check(){
            if($('[name=stu_name]').val()==''){
                $('#pop_stu_name').html('学员姓名必须填写！');
                $('[name=stu_name]').focus();
                return false;
            }
            if($('[name=stu_year]').val()==''){
                $('#pop_stu_year').html('年级必须填写！');
                $('[name=stu_year]').focus();
                return false;
            }
            if($('[name=stu_school]').val()==''){
                $('#pop_stu_school').html('学员所在学校必须填写！');
                $('[name=stu_school]').focus();
                return false;
            }
            if($('[name=stu_jzname]').val()==''){
                $('#pop_stu_jzname').html('学员家长姓名必须填写！');
                $('[name=stu_jzname]').focus();
                return false;
            }
            if($('[name=stu_jzsj]').val()==''){
                $('#pop_stu_jzsj').html('学员家长电话必须填写！');
                $('[name=stu_jzsj]').focus();
                return false;
            }
            if($('[name=stu_gx]').val()==''){
                $('#pop_stu_gx').html('家长与学员关系必须填写！');
                $('[name=stu_gx]').focus();
                return false;
            }
            if($('[name=stu_address]').val()==''){
                $('#pop_stu_address').html('学员家庭住址必须正确填写！');
                $('[name=stu_address]').focus();
                return false;
            }
            if($('[name=stu_info]').val()==''){
                $('#pop_stu_info').html('学员详细情况，学科、非学科信息必须填写！');
                $('[name=stu_info]').focus();
                return false;
            }
            if($('[name=stu_teacher]').val()==''){
                $('#pop_stu_teacher').html('师资要求必须填写！');

                $('[name=stu_teacher]').focus();
                return false;
            }
            if($('[name=stu_beizhu]').val()==''){
                $('#pop_stu_beizhu').html('重要建议及备注必须填写！');

                $('[name=stu_beizhu]').focus();
                return false;
            }

            return true;
        }

        function isNumber(field)
         {
            var   Ret   =   true;
            var   NumStr= "0123456789 ";
            var   chr;
            for   (i=0;i <field.length;++i)
            {
            chr=field.charAt(i);
            if   (NumStr.indexOf(chr,0)==-1)
            {
            Ret=false;
            }
            }
            return(Ret);
        }
    });